<template>
	<view class="" style="padding: 24rpx 36rpx;">
		<block v-if="info">
			<view class="title">
				<view class="tq-text-line2">
					<text class="font-size-17 font-bold">{{info.name||''}}</text>
				</view>
				<view class="mar-t-3">
					<text class="time font-color-666 font-size-12">{{transformTime(info.create_time)||''}}</text>
				</view>
			</view>
			<view class="mar-t-20 pad-b-20" v-if="content">
				<rich-text :nodes="content"></rich-text>
			</view>
		</block>
	</view>
</template>

<script>
import { helpDetail } from '@/utils/http'
export default {
	data() {
		return {
			info: '',
			content: ''
		}
	},
	methods: {
		detail(id) {
			const _that = this
			helpDetail({ id }).then(res => {
				if (res) {
					_that.info = res
					this.content = this.formatRichText(res.content)
					// .replace(/\\/g, '')
					// .replace(/<img/g, '<img style="display:none;"')
					// .replace(/<o:p>/g, '')
					// .replace(/<\/o:p>/g, '')
				}
			})
		}
	},
	onLoad(option) {
		this.detail(option.id)
	}
}
</script>

<style scoped>
</style>